package com.springboot.web;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("thymeleaf")
public class ThymeleafController {


    @GetMapping("index")
    public String index(Model model){

        model.addAttribute("username", "小张");

        return "index";
    }

}
